package com.example.rabbitmq.ack.direct;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AckDirectConfig {
    @Bean
    public Queue queueA() {
        return new Queue("ackDirectQueue");
    }

    @Bean
    public DirectExchange directExchange() {
        return new DirectExchange("ackDirectExchange");
    }

    @Bean
    public Binding binding() {
        return BindingBuilder.bind(queueA()).to(directExchange()).with("ackDirectRouting");
    }

}
